<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@include file="/pages/include/base-head.jsp"%>
	<%@include file="/pages/include/jquery-easyui.jsp"%>
	<link rel="stylesheet" type="text/css" href="${skin}/css/system/admin.css"/>
	<script type="text/javascript" src="${skin}/js/system/admin.js"></script>
	<script type="text/javascript" src="${skin}/js/system/user-setup.js"></script>
</head>
<body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false" style="height:80px" class="header-bg">
			<div class="header">
				<div id="logo" class="float-left">
					<img src="${skin}/image/system/admin/logo.png" alt="logo" title="${contextTitle}" />
				</div>
				<div id="setup" class="float-right">
					
					<div class="user-info">
						<img src="${skin}/image/system/admin/head-icon.png" alt="头像" title="${loginUser.nickname}" onclick="system.user.setup();"/>
						<div><strong>${loginUser.nickname}</strong>，欢迎您！</div>
						<div>
							<c:if test="${!empty loginUser.department}">
								${loginUser.department.name}
							</c:if>
						</div>
						<div>登录时间:<fmt:formatDate value="${loginUser.loginTime}" pattern="MM-dd HH:mm"/></div>
					</div>
					
					<a href="javascript:void(0);" class="setup-icon" onclick="refreshHomepageTab(true);">
						<img src="${skin}/image/system/admin/home-icon.png" alt="首页" title="返回首页" />
					</a>
					
					<a href="javascript:void(0);" class="setup-icon" onclick="system.user.setup();">
						<img src="${skin}/image/system/admin/setup-icon.png" alt="个人设置" title="个人设置" />
					</a>
					
					<a href="javascript:void(0);" class="setup-icon">
						<img src="${skin}/image/system/admin/help-icon.png" alt="帮助" title="帮助" />
					</a>
					
					<a href="${contextPath}/logout" class="setup-icon">
						<img src="${skin}/image/system/admin/exit-icon.png" alt="退出" title="退出系统" />
					</a>
				</div>
				<div class="clear"></div>
			</div>
		</div>
		<div data-options="region:'west',split:true" style="width:200px;">
			<div class="easyui-accordion" data-options="fit:true,border:false,onSelect:selectAccordion" style="background-color:#d7ebfa;">
				<c:forEach var="m" items="${menus}">
					<div menu-id="${m.id}" style="padding:5px;background-color:#d7ebfa;background-image:url(${skin}/image/system/admin/left-menu-bg.png);background-position: 0px -100px;" data-options="title:'${m.name}',iconCls:'icon-folder'">
						<ul id="menu-tree-${m.id}"></ul>
					</div>
				</c:forEach>
			</div>
		</div>
		<div data-options="region:'center'">
			<div id="tabpanel" class="easyui-tabs" data-options="fit:true,border:false,plain:false,onContextMenu:tabpanelContextMenu"></div>
		</div>
		<div data-options="region:'south',border:false,split:false" style="height:30px;background-color:#ABD3EF;" class="header-bg">
			<div class="header">
				<div id="copyright">${systemCopyright}</div>
				<div id="msgbox"></div>
			</div>
		</div>
	</div>
	
	<!-- 在tabpanel头右键弹出的菜单 -->
	<div id="tabpanel-menu" class="easyui-menu" style="width:120px;">
		<div onclick="closeTab('close');" data-options="iconCls:'icon-cancel'">关闭</div>
		<div onclick="closeTab('other');">关闭其它</div>
		<div onclick="closeTab('all');">关闭全部</div>
		<div onclick="closeTab('left');">关闭左边</div>
		<div onclick="closeTab('right');">关闭右边</div>
	</div>
</body>
</html>
